﻿using DtoFw;
using DtoFw.Interface;
using DtoFw.Query;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SceneEvidenceAPISDK
{
    public class ApiSerial : Base, ISerial
    {
        /// <summary>
        /// 删除序号
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        public BaseResult Delete(DeleteSingleDto query)
        {
            return HttpTools.Delete<BaseResult>(query,
                 base.GetApiRouter("Delete"));
        }
        /// <summary>
        /// 新增序号
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        public BaseResult Post(SerialNumberPostDto dto)
        {
            return HttpTools.Post<BaseResult>(dto,
                base.GetApiRouter("Post"));
        }
        /// <summary>
        /// 编辑序号
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        public BaseResult Put(SerialNumberPutDto dto)
        {
            return HttpTools.Put<BaseResult>(dto,
                base.GetApiRouter("Put"));
        }
        /// <summary>
        /// 拆线呢序号列表
        /// </summary>
        /// <returns></returns>
        public BaseGenericResult<List<SerialNumberQueryDto>> Query()
        {
            return HttpTools.Get<BaseGenericResult<List<SerialNumberQueryDto>>>(base.GetApiRouter("Query"));
        }
    }
}
